package com.cskaoyan.service.impl;

import com.cskaoyan.bean.bo.WxFeedbackBO;
import com.cskaoyan.bean.pojo.MarketFeedback;
import com.cskaoyan.mapper.MarketFeedbackMapper;
import com.cskaoyan.service.WxFeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.lang.reflect.Array;
import java.util.Arrays;

/**
 * @author Tang_XueCheng
 * @description
 * @since 2022/04/09 14:19
 */
@Service
public class WxFeedbackServiceImpl implements WxFeedbackService {
    @Autowired
    MarketFeedbackMapper marketFeedbackMapper;
    @Override
    public void feedbackSubmit(WxFeedbackBO wxFeedbackBO) {
        MarketFeedback marketFeedback = new MarketFeedback();
        marketFeedback.setContent(wxFeedbackBO.getContent());
        marketFeedback.setFeedType(wxFeedbackBO.getFeedType());
        marketFeedback.setHasPicture(wxFeedbackBO.isHasPicture());
        marketFeedback.setMobile(wxFeedbackBO.getMobile());
        marketFeedback.setPicUrls(Arrays.toString(wxFeedbackBO.getPicUrls()));
        marketFeedbackMapper.insertSelective(marketFeedback);
    }
}
